<template>
  <div>
    <div class="comTitle clearfix">
      <div class="titleName fl" v-html="companyName"></div>
      <div
        :class="{'fr':true,'status':tabNum==='0','pass':tabNum==='1','red':tabNum==='2'}"
        v-if="type!=='0'"
        v-html="statusList[tabNum]"
      ></div>
    </div>
    <div class="basic-info-box">
      <div class="basic-info-title">基本信息</div>
      <ul class="info clearfix">
        <li style="width: 100%;">
          <div class="infoLabel">公司名称:</div>
          <div class="infoText" v-html="baseInfo.companyname"></div>
        </li>
        <li>
          <div class="infoLabel">所在地区:</div>
          <div class="infoText" v-html="baseInfo.cityname"></div>
        </li>
        <li>
          <div class="infoLabel">公司性质:</div>
          <div class="infoText" v-html="baseInfo.companytypename"></div>
        </li>
        <li>
          <div class="infoLabel">法人姓名:</div>
          <div class="infoText" v-html="baseInfo.legalperson"></div>
        </li>
        <li>
          <div class="infoLabel">公司规模:</div>
          <div class="infoText" v-html="baseInfo.companysizename"></div>
        </li>
        <li>
          <div class="infoLabel">所属行业:</div>
          <div class="infoText" v-html="baseInfo.industrytypename"></div>
        </li>
        <li>
          <div class="infoLabel">公司地址:</div>
          <div class="infoText" v-html="baseInfo.address"></div>
        </li>
        <li>
          <div class="infoLabel">联系人:</div>
          <div class="infoText" v-html="baseInfo.username"></div>
        </li>
        <li>
          <div class="infoLabel">联系电话:</div>
          <div class="infoText" v-html="baseInfo.telnum"></div>
        </li>
        <li>
          <div class="infoLabel">企业联系电话:</div>
          <div class="infoText" v-html="baseInfo.linkphone"></div>
        </li>
        <li>
          <div class="infoLabel">企业邮箱:</div>
          <div class="infoText" v-html="baseInfo.companyemail"></div>
        </li>
        <li>
          <div class="infoLabel">营业执照:</div>
          <div class="infoText licenseimg">
            <img
              :src="`data:image/png;base64,${logoUrl}`"
              alt="营业执照"
              width="100px"
              height="100px"
              @click="isShowImg()"
            >
          </div>
        </li>
        <li v-if="imgDatas.length>0">
          <div class="infoLabel">企业风采:</div>
          <div class="infoText licenseimg1">
            <img
              v-for="item in imgDatas"
              :key="item"
              :src="item"
              alt="企业风采"
              width="86px"
              @click="currentImgShow(1,item)"
            >
          </div>
        </li>
        <li v-if="(type == 2 || type == 3) && yzImg.length>0">
          <div class="infoLabel" v-show="type == 2">优质认证:</div>
          <div class="infoLabel" v-show="type == 3">知名认证:</div>
          <div class="infoText licenseimg1">
            <img
              v-for="item in yzImg"
              :key="item"
              @click="currentImgShow(type,item)"
              :src="item"
              alt
              width="86px"
            >
          </div>
          <!-- @click="isShowImg()" -->
        </li>
      </ul>

      <div class="company-introduction clearfix:after">
        <div class="company-introduction-title fl">企业介绍:</div>
        <pre class="company-introduction-content fl" v-html="baseInfo.introduction"></pre>
      </div>

      <!-- 平台信息 -->
      <div class="tabShow" v-if="type==='0'">
        <div class="basic-info-title">平台信息</div>
        <ul class="info clearfix">
          <li>
            <div class="infoLabel">平台注册时间:</div>
            <div class="infoText" v-html="baseInfo.insertdate"></div>
          </li>
          <li>
            <div class="infoLabel">企业分类:</div>
            <div
              class="infoText"
              v-if="baseInfo.approvetype && baseInfo.typestatus ==='1'"
              v-html="baseInfo.approvetype==='0'?'知名企业':'优质企业'"
            ></div>
            <div class="infoText" v-else>普通企业</div>
          </li>
          <li>
            <div class="infoLabel">企业信息审核人:</div>
            <div class="infoText" v-html="baseInfo.auditorname"></div>
          </li>
          <li>
            <div class="infoLabel">审核时间:</div>
            <div class="infoText" v-html="baseInfo.auditdate"></div>
          </li>
          <li v-if="baseInfo.approvetype && baseInfo.typestatus ==='1'">
            <div class="infoLabel" v-html="baseInfo.approvetype==='0'?'知名企业审核人:':'优质企业审核人:'"></div>
            <div class="infoText" v-html="baseInfo.typeauditorname"></div>
          </li>
          <li v-if="baseInfo.approvetype && baseInfo.typestatus ==='1'">
            <div class="infoLabel">审核时间:</div>
            <div class="infoText" v-html="baseInfo.typeauditdate"></div>
          </li>
        </ul>
      </div>
      <div v-if="tabNum==='0'" class="tabShow">
        <div class="title">审核结果</div>
        <div style="height:40px;display: flex;align-items: center;">
          <el-radio-group v-model="result" style="padding:0 20px" @change="resultChange">
            <el-radio :label="'1'">通过</el-radio>
            <el-radio :label="'2'">驳回</el-radio>
          </el-radio-group>
          <el-input v-show="result==='2'" placeholder="驳回原因 :" v-model="remark" style="width:400px"></el-input>
        </div>
        <div class="btnBox">
          <el-button @click="cancel">取消</el-button>
          <el-button type="primary" @click="submit">提交</el-button>
        </div>
      </div>
      <div v-if="tabNum==='1'||tabNum==='2'" class="tabShow">
        <div v-if="type==='1'" class="title">审核信息</div>
        <div v-if="type==='2'" class="title">优质企业审核信息</div>
        <div v-if="type==='3'" class="title">知名企业审核信息</div>
        <ul class="info clearfix">
          <li>
            <div class="infoLabel">审核结果:</div>
            <div
              :class="{'infoText':true,'pass':tabNum==='1','red':tabNum==='2'}"
              v-html="statusList[tabNum]"
            ></div>
          </li>
          <li>
            <div class="infoLabel">审核人:</div>
            <div class="infoText" v-html="type==='1'?baseInfo.auditorname:baseInfo.typeauditorname"></div>
          </li>
          <li>
            <div class="infoLabel">审核时间:</div>
            <div class="infoText" v-html="type==='1'?baseInfo.auditdate:baseInfo.typeauditdate"></div>
          </li>
          <li v-if="tabNum==='2'">
            <div class="infoLabel infoLabel_left">未通过原因:</div>
            <!-- <div class="infoText infoText_right" v-html="baseInfo.desc"></div> -->
            <pre class="infoTexty">{{baseInfo.desc}}</pre>
          </li>
        </ul>
      </div>
    </div>
    <el-dialog
      title="营业执照"
      :visible.sync="dialogVisible"
      width="30%"
      append-to-body
      custom-class="bigImg"
    >
      <img :src="'data:image/png;base64,'+logoUrl" alt width="100%" height="100%">
    </el-dialog>
    <el-dialog
      :title="currentTitle"
      custom-class="bigImg"
      :visible.sync="imgDialogVisible"
      width="30%"
      append-to-body
    >
      <img :src="currentUrl" alt width="100%" height="100%">
    </el-dialog>
  </div>
</template>

<script src="./index.js"></script>
<style scoped src="./index.css"></style>

